<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>addCar</title>
<style type="text/css">
  .form_control .valid_message {color: #32BC61;}
  .form_control.error .valid_message {color: #f00;}
  input[type="submit"] {
  background: #ffd800;
  padding: 0.5em 1.5em;
  border:none;
  outline: none;
  cursor: pointer;
  font-size: 1.1em;
}
input[type="submit"]:hover{
  background: #e2e5e2;
  color:#ec222f;
}
  </style>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.js"></script>
<link rel="stylesheet" type="text/css" href="css/jqueryslidemenu.css" />
<script type="text/javascript" src="js/jqueryslidemenu.js"></script>
<link href="css/screen.css" rel="stylesheet" type="text/css" media="screen" />	
<script type="text/javascript" src="js/easySlider1.7.js"></script>
<script type="text/javascript">
		$(document).ready(function(){	
			$("#slider").easySlider({
				auto: true, 
				continuous: true,
				numeric: true
			});
		});	
</script>
</head>

<body>
  <div id="wrapper">
    <div id="topbar">
      <div id="logo"><img src="images/logo.gif" alt="" width="319" height="75" onclick="javascript:window.location.href='index.jsp'" /></div>
      <div id="skin">
			<ul>
				<c:choose>
					<c:when test="${customerName != null}">
						<li style="color:#fff;">欢迎您:<a href="#">${customerName}</a></li>
					</c:when>
					<c:otherwise>
						<li><a href="loginButton.action?a=login">[登录]</a></li>
						<li><a href="registButton.action?a=regist">[注册]</a></li>
					</c:otherwise>
				</c:choose>
			</ul>
		</div>
    </div>
    <div id="nav"><div id="myslidemenu" class="jqueryslidemenu">
<ul>
<li><a href="index.jsp">主页</a></li>
<li><a href="top_report.action">报案</a></li>
<li><a href="script:void(0)">我的信息</a>
  <ul>
  <li><a href="top_caseinfo.action">案件信息</a></li>
  <li><a href="top_carinfo.action">车辆信息</a></li>
  </ul>
</li>
<li><a href="top_addcar.action">添加车辆</a></li>
<li><a href="script:void(0)">其他</a>
  <ul>
  <li><a href="script:void(0)">案件申述(还没做)</a></li>
  <li><a href="top_changepass.action">修改密码</a></li>
  </ul>
</li>
<li><a href="top_exit.action">安全退出</a></li>
</ul>
<br style="clear:left" />
</div>
</div>
    <div id="content">
	    <div class="grey2" style="width:95%;">
	      	<fieldset style="padding:5px;">
			<legend><h2>添加车辆</h2></legend>
				<form action="addCar.action" method="post">
				<!-- 表单内容 -->
				<ul style="list-style:none;width:42%;float:left;">
					<li>车牌:
						<div class="form_control">				
							<input class="required" name="carEntity.carid" type="text" data-tip="请输入车牌" data-valid="isNonEmpty" data-error="车牌必填"/>						
						</div>
					</li>
					<li>车架号:
						<div class="form_control">
					      	<input class="required" name="carEntity.carVIN" type="text" data-tip="请输入车架号" data-valid="isNonEmpty" data-error="车架号必填"/>
					    </div>
					</li>
					<li>发动机号:
						<div class="form_control">
					      	<input class="required" name="carEntity.carEngineNo" type="text" data-tip="请输入发动机号" data-valid="isNonEmpty" data-error="发动机号必填"/>
					    </div>
					</li>
					<li>类型:
						<div class="form_control">				
							<input class="required" name="carEntity.carType" list="car" data-tip="请输入类型" data-valid="isNonEmpty" data-error="类型必填"/>						
							<datalist id="car">
								<option value="大型客车">A1</option>
								<option value="城市公交车">A2</option>
								<option value="中型客车">B1</option>
								<option value="大型货车">B2</option>
								<option value="小型汽车">C1</option>
							</datalist>
						</div>
					</li>
					<li>价格:
						<div class="form_control">
					      	<input class="required" name="carEntity.carPrice" type="text" data-tip="请输入价格" data-valid="isNonEmpty" data-error="价格必填"/>
					    </div>
					</li>
				</ul>
				<ul style="list-style:none;width:49%;float:left;">
				<li>　</li><li>　</li><li>　</li><li>　</li>
				<li>　</li><li>　</li><li>　</li><li>　</li>
				<li>　</li><li>　</li>
					<li>
					<input type="submit" value="提交" />
					</li>
				</ul>
				</form>
			</fieldset>
	    </div>
    </div>
    <div id="footer">Copyright &copy; com.kun 593921602.</div>
  </div>
  	<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
	<script type="text/javascript" src="js/jquery-validate.js"></script>
	<script type="text/javascript">
	  $('form').validate({
	    onFocus: function() {
	      this.parent().addClass('active');
	      return false;
	    },
	    onBlur: function() {
	      var $parent = this.parent();
	      var _status = parseInt(this.attr('data-status'));
	      $parent.removeClass('active');
	      if (!_status) {
	        $parent.addClass('error');
	      }
	      return false;
	    }
	  });
	 
	</script>
</body>
</html>

